package com.zsr.xmall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zsr.common.entity.product.AttrGroupEntity;
import com.zsr.common.utils.PageUtils;
import com.zsr.common.vo.product.AttrGroupWithAttrsVo;
import com.zsr.common.vo.product.SpuItemAttrGroupVO;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author zsrey
 * @email zsrey8880@163.com
 * @date 2022-06-09 23:33:50
 */
public interface AttrGroupService extends IService<AttrGroupEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPage(Map<String, Object> params, Long catelogId);

    /**
     * 根据id查出所有分组以及组里的属性
     *
     * @param catelogId
     * @return
     */
    List<AttrGroupWithAttrsVo> getAttrGroupWithAttrsByCatelogId(Long catelogId);

    /**
     * 查出spu对应的所有属性的分组信息以及当前分组下的所有属性对应的值
     *
     * @param spuId
     * @param catelogId
     * @return
     */
    List<SpuItemAttrGroupVO> getAttrGroupWithAttrBySpuId(Long spuId, Long catelogId);
}

